import axios from '@/http/axios'

export function httpAction (url, method, data) {
  return axios({
    // url: url,
    url: url,
    method: method,
    data: data
  })
}

export function getAction (url, params) {
  return axios({
    url: url,
    method: 'get',
    params: params,
  })
}

export function postAction (url, data,rest) {
  return axios({
    url: url,
    method: 'post',
    data: data,
    ...rest
  })
}

export function putAction (url, data) {
  return axios({
    url: url,
    method: 'put',
    data: data,
  })
}

export function deleteAction (url, params) {
  return axios({
    url: url,
    method: 'delete',
    params: params,
  })
}


